package day_03;

import java.util.Scanner;

/**
 * @ClassName HomeWork
 * @Description TODO
 * @Author hp
 * @Date 2021/6/4 19:37
 * @Version 1.0
 **/
public class HomeWork {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        //第一题
        /*Scanner in = new Scanner(System.in);
        System.out.println("请输入一个整数:");
        int num = in.nextInt();
        if (num % 2 == 0) {
            System.out.println(num + "是偶数");
        } else {
            System.out.println(num + "是奇数");
        }*/

        //第二题
        /*System.out.println("请输入一个字符:");
        char ch1 = in.next().charAt(0);
        if (ch1 >= 48 && ch1 <= 57) {
            System.out.println(ch1 + "是数字");
        } else if ((ch1 >= 65 && ch1 <= 91) || (ch1 >= 97 && ch1 < 123)) {
            System.out.println(ch1 + "是字母");
        } else {
            System.out.println("非数字非字母的其他字符");
        }*/

        //第三题
        /*System.out.print("请输入总价格:");
        int totalPrice = in.nextInt();
        double discont = 1;
        if (totalPrice >= 500) {
            discont = 0.5;
        } else if (totalPrice >= 400 && totalPrice < 500) {
            discont = 0.6;
        } else if (totalPrice >= 300 && totalPrice < 400) {
            discont = 0.7;
        } else if (totalPrice >= 200 && totalPrice < 300) {
            discont = 0.8;
        } else if (totalPrice >= 0 && totalPrice < 200) {
            discont = 0.9;
        } else {
            System.out.println("输入有误");
        }
        System.out.println("总价:" + totalPrice);
        System.out.println("折扣:" + discont);
        System.out.println("折扣后总价" + totalPrice * discont);*/

        //第五题
        /*System.out.print("请输入第一个整数:");
        int m = in.nextInt();
        System.out.print("请输入第二个整数:");
        int n = in.nextInt();
        System.out.print("请输入你要进行的计算(+,-,*,/,%,&,|,^,>>,<<,>>>):");
        String str = in.next();
        switch (str) {
            case "+":
                System.out.println(m + "+" + n + "=" + (m + n));
                break;
            case "-":
                System.out.println(m + "-" + n + "=" + (m - n));
                break;
            case "*":
                System.out.println(m + "*" + n + "=" + (m * n));
                break;
            case "/":
                System.out.println(m + "/" + n + "=" + (m / n));
                break;
            case "%":
                System.out.println(m + "%" + n + "=" + (m % n));
                break;
            case "&":
                System.out.println(m + "&" + n + "=" + (m & n));
                break;
            case "|":
                System.out.println(m + "|" + n + "=" + (m | n));
                break;
            case "^":
                System.out.println(m + "^" + n + "=" + (m ^ n));
                break;
            case ">>":
                System.out.println(m + ">>" + n + "=" + (m >> n));
                break;
            case "<<":
                System.out.println(m + "<<" + n + "=" + (m << n));
                break;
            case ">>>":
                System.out.println(m + ">>>" + n + "=" + (m >>> n));
                break;
            default:
                System.out.println("error");
                break;
        }*/

        //第七题
        /*System.out.print("月:");
        int month = in.nextInt();
        System.out.print("日:");
        int days = in.nextInt();
        int week = 2;
        System.out.print(month + "月" + days + "日是这一年的第");
        switch (month) {
            case 12:
                days += 31;
            case 11:
                days += 30;
            case 10:
                days += 31;
            case 9:
                days += 30;
            case 8:
                days += 31;
            case 7:
                days += 31;
            case 6:
                days += 30;
            case 5:
                days += 31;
            case 4:
                days += 30;
            case 3:
                days += 31;
            case 2:
                days += 29;
            case 1:
                System.out.print(days + "天");
        }
        int day = (days + 3) % 7 + 1;
        switch (day) {
            case 1:
                System.out.print(",是星期一");
                break;
            case 2:
                System.out.print(",是星期二");
                break;
            case 3:
                System.out.print(",是星期三");
                break;
            case 4:
                System.out.print(",是星期四");
                break;
            case 5:
                System.out.print(",是星期五");
                break;
            case 6:
                System.out.print(",是星期六");
                break;
            case 7:
                System.out.print(",是星期日");
                break;
        }*/
    }

}
